@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="schoolTerm">
            <div class="row">
                <div class="col-sm-12 b-r">
                    <input type="hidden" name="orgId" value="${schoolYear.orgId }"/>
                    <input type="hidden" value="${schoolYear.id}" id="id"/>
                </div>
                <#input id="postCode" name="学年" underline="true" value="${schoolYear.name}" disabled="disabled" style="width:74%"/>
                <#select id="sysTermId" name="学期名称" underline="true" style="width:-3%">
                <option value="">请选择</option>
                @for(systerm in sysTerms){
                <option value="${systerm.id}">${systerm.name}</option>
                @}
            </#select>
            <div class="form-group" style="float:left;display:flex;width:100%">
                <label>学期范围:</label>
                <input class="form-control" style="width: 40%"  type="text" placeholder="开始时间"  name="termStartTime" id="termStartTime">
                <span style="float:left;margin:6px;">至</span>
                <input class="form-control" style="width: 40%"   type="text" placeholder="结束时间"  name="termEndTime" id="termEndTime">
            </div>
            <div class="form-group" style="float:left;display:flex;width:100%">
                <label>教学日期:</label>
                <input class="form-control" style="width: 40%"  type="text" placeholder="开始时间"  name="teachStartTime" id="teachStartTime">
                <span style="float:left;margin:6px;">至</span>
                <input class="form-control" style="width: 40%"   type="text" placeholder="结束时间"  name="teachEndTime" id="teachEndTime">
            </div>

            </div>
            <div class="row btn-group-m-t">
                <div class="col-sm-10" style="text-align: center">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="PtSchoolTerm.addSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="PtSchoolTerm.close()"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/system/ptSchoolYearTerm/ptSchoolTerm.js"></script>

<style>
    .unit {
        display: block;
        padding: 5px 0;
        position: relative;
        clear: both;
        margin-left: 102px;
    }
    label{
        float: left;
        width: 120px;
        padding: 0 5px;
        line-height: 21px;
        margin-left: 42px;

    }
    .inputStyle{

        background-color: rgb(255, 255, 255);
        background-image: none;
        color: inherit;
        display: block;
        width: 74%;
        font-size: 14px;
        border-width: 1px;
        border-style: solid;
        border-color: rgb(229, 230, 231);
        border-image: initial;
        border-radius: 1px;
        padding: 5px 24px;
        transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;

    }

</style>
@}
<script>
    //开始时间时间
    let start_a = laydate.render({
        elem: '#termStartTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            end.config.min = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //开始日选好后，重置结束日的最小日期
            end.config.value = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //将结束日的初始值设定为开始日
        }
    });
    //开始时间时间
    let start_a1 = laydate.render({
        elem: '#teachStartTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            end.config.min = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //开始日选好后，重置结束日的最小日期
            end.config.value = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //将结束日的初始值设定为开始日
        }
    });
    //结束时间
    let end = laydate.render({
        elem: '#termEndTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            start_a.config.max = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //结束日选好后，重置开始日的最大日期
        }
    });
    //结束时间
    let end1 = laydate.render({
        elem: '#teachEndTime',
        trigger: 'click', //采用click弹出
        theme: '#3278F0',
        format: 'yyyy.MM.dd',
        done: function (value, date, endDate) {
            start_a.config.max = {
                year: date.year,
                month: date.month - 1,
                date: date.date,
            }; //结束日选好后，重置开始日的最大日期
        }
    });
</script>